<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box
        {
            width: 100px;
            height: 100px;
            transition-property: transform;
            transition-duration: 3s;
            transition-timing-function: ease-in;
            background-color: red;
        }

        .box:hover
        {
              /* transform-origin: 10px 10px; */
              /* transform:rotate(30deg); */
              /* transform: translate(100px); */
              
              /* 设置使用的动画样式 */
              animation-name: movemethod;
              /* 设置持续时间 */
              animation-duration: 3s;
              /* 设置曲线方式 */
              animation-timing-function: ease-in;
              /* 设置最后的位置 */
              animation-fill-mode: forwards;
        }

        @keyframes movemethod {

            0%
            {
               transform: translate(0,0);
            }
            
            50%
            {
                transform: translate(100px,100px);
            }

            100%
            {
                transform: translate(200px,200px);
            }
        }

        
    </style>
</head>
<body>
    <div class="box"> </div>
</body>
</html>